/**
 * Copyright (c) Software Institude of PKU
 * All rights reserved. 
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 */
package edu.pku.sei.modeler.model.uml.BasicBehaviors;
// imports:
import org.w3c.dom.Element;

import edu.pku.sei.gefcommon.descriptor.annotation.MethodProperty;
import edu.pku.sei.modeler.model.common.*;
import edu.pku.sei.modeler.model.core.*;
import edu.pku.sei.modeler.model.xml.XMLUtility;
import edu.pku.sei.modeler.uml.modelHelper.ModelPackage;



/**
 * @generated
 *
 */
public class OpaqueBehavior extends Behavior implements IOpaqueBehavior {
	// attributes
	
	protected String body;
	
	protected String language;
	
	
	
	
	// references
	
	
	
	// getters & setters for attributes
	
	@MethodProperty(
			id = "OPAQUEBEHAVIOR_BODY",
			catalog = "Model",
			name = ModelPackage.OPAQUEBEHAVIOR_BODY,
			setter = "setBody"
			)
	
	public String getBody() {
		return body;
	}
	public void setBody(String newBody) {
		String oldbody = body;
		body = newBody;
		firePropertyChange(ModelPackage.OPAQUEBEHAVIOR_BODY, oldbody, newBody);
	}
	
	@MethodProperty(
			id = "OPAQUEBEHAVIOR_LANGUAGE",
			catalog = "Model",
			name = ModelPackage.OPAQUEBEHAVIOR_LANGUAGE,
			setter = "setLanguage"
			)
	
	public String getLanguage() {
		return language;
	}
	public void setLanguage(String newLanguage) {
		String oldlanguage = language;
		language = newLanguage;
		firePropertyChange(ModelPackage.OPAQUEBEHAVIOR_LANGUAGE, oldlanguage, newLanguage);
	}
	
	// getters for references
	
	// save & load
	public void serialize(Element root) {
		super.serialize(root);
		// attributes
		
		XMLUtility.xmlInstance.serializeAttribute(root, ModelPackage.OPAQUEBEHAVIOR_BODY, body);
		
		XMLUtility.xmlInstance.serializeAttribute(root, ModelPackage.OPAQUEBEHAVIOR_LANGUAGE, language);
		
		// references
		
	}
	
	public void deSerialize(Element root) {
		super.deSerialize(root);
		// attributes
		
		body = XMLUtility.xmlInstance.deSerializeString(root, ModelPackage.OPAQUEBEHAVIOR_BODY);
		
		language = XMLUtility.xmlInstance.deSerializeString(root, ModelPackage.OPAQUEBEHAVIOR_LANGUAGE);
		
		// references
		
	}
	
	public void dynamicSet(String featureID, Object value) {
		if(featureID == null || "".equals(featureID)) {
			return;
		}
		// attributes
		
		// references
		
		else
			super.dynamicSet(featureID, value);
	}
}
 
 
 
 
 